/**
 * Author: w景洋.
 * Time: 2016/6/13 0013
 */
mall.run(
    ['$rootScope', '$state', '$stateParams',
        function ($rootScope, $state, $stateParams) {
            $rootScope.$state = $state;
            $rootScope.$stateParams = $stateParams;
        }
    ]
)

mall.config(
    ['$stateProvider', '$urlRouterProvider', '$locationProvider',
        function ($stateProvider, $urlRouterProvider, $locationProvider) {
            $urlRouterProvider
                .when('/detail/:id/:tag', '/detail/:id')
                .when('/menu/:shopid/:tag', '/menu/:shopid')
                .when('/shop/:id/:cid', '/shop/:id')
                .when('/cmtshop/placeorder/:id', '/cmtshop/placeorder')
                .otherwise('/?county=330329');
            // use the HTML5 History API
            $locationProvider.html5Mode(html5mode);
        }
    ]
)
;